package com.aiyige.im.model;

import java.io.Serializable;

public class CustomMsgData implements Serializable {
    String image;       /// 消息内封面、头像等图片键名
    String title;       /// 消息内标题键名
    String subtitle; /// 消息内子标题键名
    String router;     /// 消息内对象路由键名
    String price;     /// 消息内对象商品价格
    String subject;// 消息对象类型 内容还是名片
    String linePrice;//消息内对象商品划线价格


    public CustomMsgData() {
    }

    private CustomMsgData(Builder builder) {
        setImage(builder.image);
        setTitle(builder.title);
        setSubtitle(builder.subtitle);
        setRouter(builder.router);
        setPrice(builder.price);
        setSubject(builder.subject);
        setLinePrice(builder.linePrice);
    }

    public static Builder newBuilder() {
        return new Builder();
    }


    public String getImage() {
        return image == null ? "" : image;
    }

    public void setImage(String image) {
        this.image = image == null ? "" : image;
    }

    public String getTitle() {
        return title == null ? "" : title;
    }

    public void setTitle(String title) {
        this.title = title == null ? "" : title;
    }

    public String getSubtitle() {
        return subtitle == null ? "" : subtitle;
    }

    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle == null ? "" : subtitle;
    }

    public String getRouter() {
        return router == null ? "" : router;
    }

    public void setRouter(String router) {
        this.router = router == null ? "" : router;
    }

    public String getSubject() {
        return subject == null ? "" : subject;
    }

    public void setSubject(String subject) {
        this.subject = subject == null ? "" : subject;
    }

    public String getPrice() {
        return price == null ? "" : price;
    }

    public void setPrice(String price) {
        this.price = price == null ? "" : price;
    }

    public String getLinePrice() {
        return linePrice == null ? "" : linePrice;
    }

    public void setLinePrice(String linePrice) {
        this.linePrice = linePrice == null ? "" : linePrice;
    }


    public static final class Builder {
        private String image;
        private String title;
        private String subtitle;
        private String router;
        private String price;
        private String subject;
        private String linePrice;

        private Builder() {
        }

        public Builder image(String val) {
            image = val;
            return this;
        }

        public Builder title(String val) {
            title = val;
            return this;
        }

        public Builder subtitle(String val) {
            subtitle = val;
            return this;
        }

        public Builder router(String val) {
            router = val;
            return this;
        }

        public Builder price(String val) {
            price = val;
            return this;
        }

        public Builder subject(String val) {
            subject = val;
            return this;
        }

        public Builder linePrice(String val) {
            linePrice = val;
            return this;
        }

        public CustomMsgData build() {
            return new CustomMsgData(this);
        }
    }
}
